<link rel="stylesheet" href="{{ URL::asset('/ucenter/css/base.css') }}">
<link rel="stylesheet" href="{{ URL::asset('/ucenter/css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ URL::asset('/ucenter/css/personCenter.css') }}">
<style>
    .divtab{
        position: relative;
    }
    .divtab .merchandiser{
        /*width:901px;*/
        height:auto;
    }
    .divtab .merchandiser > ul{
        width:100%;
        /*height:300px;*/
        margin:20px auto;
    }
    .divtab .merchandiser > ul >li{
        width:23%;
        height:270px;
        background:#fff;
        float:left;
        border-radius: 5px;
    }
    .divtab .merchandiser > ul >li span,
    .divtab .merchandiser > ul >li p {
        font-family: '微软雅黑';
    }
    .divtab .merchandiser > ul >li:nth-child(4) {
        margin-left: 20px;
    }
    .divtab .merchandiser > ul >li > img{
        width: 90px;
        height: 90px;
        border-radius:50%;
        display: block;
        margin: 24px auto;
    }
    .divtab .merchandiser > ul >li > .jname{
        width:100%;
        text-align:center;
        /*margin-top:15px;*/
        font-size:16px;
        color:#20222c;
        font-weight: bold;
    }
    .divtab .merchandiser > ul >li > .jzx{
        margin-top:3px;
        font-size: 12px;
        text-align: center;
    }
    .divtab .merchandiser > ul >li > a{
        display:block;
        font-size:12px;
        padding:0 20px;
    }
    .divtab .merchandiser > ul >li > a:hover {
        text-decoration: none;
        color: #20222c;
    }
    .divtab .merchandiser > ul >li > a > .jdian{
        float:right;
    }
    .divtab .merchandiser > ul >li > a > .jdian > b{
        font-size:14px;
    }
    .divtab .merchandiser > ul >li > a > .jli{
        /*float:left;*/
    }
    body{
        background: #f4f4f4;
    }
</style>
<script type="text/javascript" src="{{ URL::asset('public_js/jquery-3.2.1.min.js') }}"></script>
<script src="{{ URL::asset('public_js/bootstrap.min.js') }}"></script>
<script>
    function gotopage(uid,page,type){
       if(type == 0) {
        var url = "?analyst_id="+uid+"&page="+(page-1)+"&type="+type;
       }else{
        var url = "?analyst_id="+uid+"&page="+(page+1)+"&type="+type;
    }
        url = '{{url("/followerlist")}}'+url;
       
        $(window.parent.document).find("#iframeMain").attr("src",url);        
    }
    function pageclick(obj){
//        alert($(obj).attr('linkurl'));
    }
</script>
<div role="tabpanel" class="tab-pane divtab" id="dealPerson">
    <div class="merchandiser">
        
        @foreach($followdata as $key=>$val)
            @if($key%4 == 0)
                <ul class="clearfix">
            @endif
            <li @if($key%4 == 1) style="margin:0 20px;" @endif>
                <img src="{{$val->photo ? $val->photo : URL::asset('ucenter/images/head.png')}}" alt="">
                <p class="jname">{{$val->username}}</p>
                <p class="jzx">{{$val->direction == 0 ? '正向':'反向'}}订阅</p>
                <a href="javascript:;">
                    <span class="jli">订阅收益</span>
                    <span class="jdian">
                        <b>
                            {{ $val->allnum ? round($val->allnum,2) :0}}
                        </b> 点</span>
                </a>
                <br>
                <a href="javascript:;">
                    <span class="jli">定制时间</span>
                    <span class="jdian">
                        @if($val->follow_time != '')
                            {{ date('Y-m-d',$val->follow_time) }}
                        @endif    
                    </span>
                </a>
            </li>
            @if($key%4 == 3 && $key > 0)
                </ul>
            @endif
        @endforeach
    </div>
    
    @if($totalpage != 0)
        <div class="jpage">
            <div class="jpage_div1" id="pagefollow" style="font-size:14px;">
                <!-- <div>共 {{ $totalpage }}页</div> -->
                @if($page != 1 && $page != 0)
                    <a href="javascript:void(0)" onclick='gotopage({{$uid}},{{$page}},0)'  target="iframeMain" style="background-color:#3b9ce0">上一页</a>
                @else
                    <a href="javascript:void(0)"target="iframeMain" style="background-color:#c2c4c9">上一页</a>
                @endif
                <span>第<span style="color:#3b9ce0">{{ $page }}</span>页</span>

                @if($page != $totalpage && $page<$totalpage)
                    <a href="javascript:void(0)"  onclick='gotopage({{$uid}},{{$page}},1)' target="iframeMain" style="background-color:#3b9ce0">下一页</a>
                @else
                    <a href="javascript:void(0)" target="iframeMain" style="background-color:#c2c4c9">下一页</a>
                @endif
                <!-- <div>共 {{$allnum }} 条记录</div> -->
                <div>共 {{ $totalpage }} 页</div>
            </div>
        </div>
    @endif
</div>
